package com.szcinda.fitness.persistence;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
public class Appointment extends BaseEntity {

    @NotNull(message = "学员不能为空")
    private String traineeOpenId;
    @NotNull(message = "学员名称不能为空")
    private String traineeName;
    private String traineePhone;
    @NotNull(message = "学员头像不能为空")
    private String traineeAvatarUrl;
    @NotNull(message = "教练不能为空")
    private String coachOpenId;
    @NotNull(message = "教练头像不能为空")
    private String coachAvatarUrl;
    @NotNull(message = "教练名称不能为空")
    private String coachName;
    @NotNull(message = "预约日期不能为空")
    private LocalDate appointmentDate;
    @NotNull(message = "预约开始不能为空")
    private String appointmentTimeStart;
    @NotNull(message = "预约结束不能为空")
    private String appointmentTimeEnd;
    @Enumerated(EnumType.STRING)
    private AppointmentType appointmentType;
}
